import java.util.Random;

public class Main {
    static Random rn = new Random(System.currentTimeMillis());
    public static int getRandomInt(int i){
        return Math.abs(rn.nextInt())%i + 1;
    }

    public void testCustomized(){
        NodeList node1 = new NodeList(1);
        NodeList node2 = new NodeList(2);
        node1.next = node2;
        testWithNodeList(node1);
    }

    public void testWithNodeList(NodeList head){
        Solution solution = new Solution();

        int actual = solution.sum(head);
        if(actual != 3){
            String msg = "Test Failed\n";
            msg += "Input:" + "1->2" + "\n";
            msg += "Expected:" + "3" + "\n";
            msg += "Actual:" + actual;
            throw new RuntimeException(msg);
        }
    }

    public static void main(String[] args) {
        try {
            Main main = new Main();
            main.testCustomized();
        }catch (Exception ex){
            System.out.println(ex.getMessage());
            System.exit(-1);
        }
    }
}

class NodeList{
    NodeList next;
    int value;

    public NodeList(int value){
        this.value = value;
        next = null;
    }
}

